package com.wangxin.study8.completablefuture;

import java.util.concurrent.CompletableFuture;

/**
 * @ClassName RunAsyncTest
 * @Description 无返回值
 * @Author Wangxin
 * @Date 2019-03-24 18:36
 * @Version 1.0
 **/
public class RunAsyncTest {
    public static void main(String[] args) throws Exception{
        CompletableFuture<Void> future = CompletableFuture.runAsync(()->{
            try {
                Thread.sleep(100);
            }catch (Exception e){
                e.printStackTrace();
            }
            System.out.println("end…………");
        });
        System.out.println(future.get());
    }
}
